<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      #main {
        width: 500px;
        height: 400px;
        /* background-color: pink; */
        /* color: aqua; */
        border: 1px solid #eee;
      }
    </style>
  </head>
  <body>
    <div id="main">11</div>
    <script src="./echarts.min.js"></script>
    <script>
      var myChart = echarts.init(document.getElementById('main'))
      // var myChart = echarts.init(document.getElementById('main'));

      var option = {
        xAxis: {
          type: 'category',
          data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'],
        },
        yAxis: {
          type: 'value',
        },
        color: [
          {
            type: 'linear',
            x: 0,
            y: 0,
            x2: 0,
            y2: 1,
            colorStops: [
              {
                offset: 0,
                color: '#8fcce7', // 0% 处的颜色
              },
              {
                offset: 1,
                color: '#f2c0cd', // 100% 处的颜色
              },
            ],
            global: false, // 缺省为 false
          },
          {
            type: 'radial',
            x: 0.5,
            y: 0.5,
            r: 0.5,
            colorStops: [
              {
                offset: 0,
                color: '#fff', // 0% 处的颜色
              },
              {
                offset: 1,
                color: '#ff0302', // 100% 处的颜色
              },
            ],
            global: false, // 缺省为 false
          },
        ],
        series: [
          {
            data: [120, 200, 150, 80, 70, 110, 130],
            type: 'bar',
          },
          {
            data: [120, 200, 150, 80, 70, 110, 130],
            type: 'bar',
          },
        ],
      }

      myChart.setOption(option)
    </script>
  </body>
</html>
